import React from 'react'

const Home = React.lazy(() => import('../views/home'));
const Car = React.lazy(() => import('../views/car'));
const Classify = React.lazy(() => import('../views/classify'));
const My = React.lazy(() => import('../views/my'));
const MainLayout = React.lazy(() => import('../views/mainLayout'));
// 二级路由
export const CHILDREN_ROUTER_LIST = [
  {
    path: '/',
    element: <Home></Home>,
    meta: {
      title: '首页'
    }
  },
  {
    path: '/classify',
    element: <Classify></Classify>,
    meta: {
      title: '分类'
    }
  },
  {
    path: '/car',
    element: <Car></Car>,
    meta: {
      title: '购物车'
    }
  },
  {
    path: '/my',
    element: <My></My>,
    meta: {
      title: '我的'
    }
  }
]
 
// 一级路由    /classify
export const ROUTER_LIST = [
  {
    path: '/',
    element: <MainLayout></MainLayout>,
    children: CHILDREN_ROUTER_LIST
  }
]